/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* E.P. Scene Graph
* Developed by:
*       - Eduardo Ribeiro (eribeiro @ tecgraf . puc-rio . br)
*       - Peter Dam (peter @ tecgraf . puc-rio . br)
* File: Environ.h
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef _EPSG_ENVIRON_
#define _EPSG_ENVIRON_

namespace EPSG
{
	class Environ
	{
	public:

		enum FogMode
		{
			EPSG_EXP2,
			EPSG_EXP,
			EPSG_LINEAR
		};
		enum FogHint
		{
			EPSG_DONT_CARE,
			EPSG_FASTEST,
			EPSG_NICEST
		};
		/* [CONSTRUCTOR] */ Environ();

		void				setFogMode( FogMode mode );
		void				setFogColor( float r, float g, float b, float a );
		void				setFogDensity( float density );
		void				setFogHint( FogHint hint );
		void				setFogStart( float start );
		void				setFogEnd( float end );

		void				load();
		void				unload();

	private:
		/* Mode
			GL_EXP - Basic rendered fog which fogs out all of the screen.
				   It doesn't give much of a fog effect, but gets the job done on older PC's.

			GL_EXP2 - Is the next step up from GL_EXP. This will fog out all of the screen, 
					however it will give more depth to the scene.

			GL_LINEAR - This is the best fog rendering mode. Objects fade in and out of the fog much better.
		*/
		int					_mode;
		float				_color[4];
		float				_density;
		/* Hint
			GL_DONT_CARE - Lets opengl choose the kind of fog (per vertex of per pixel) and an unknown formula.

			GL_NICEST - Makes the fog per pixel (look good)

			GL_FASTEST - Makes the fog per vertex (faster, but less nice) 
		*/
		unsigned int		_hint;
		float				_start;
		float				_end;
	};
}

#endif //_EPSG_ENVIRON_